<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>库存列表</title>
    <link rel="stylesheet" type="text/css" th:href="@{/style.css}" />
</head>
<body>
<h1>库存列表</h1>
<table border="1">
    <thead>
    <tr>
        <th>ID</th>
        <th>名称</th>
        <th>数量</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="stock : ${stocks}">
        <td th:text="${stock.id}"></td>
        <td th:text="${stock.name}"></td>
        <td th:text="${stock.stock}"></td>
    </tr>
    </tbody>
</table>
<a href="/">返回首页</a>
</body>
</html>